<?php

namespace app\exception;

class ExpressException extends \Exception
{
    /**
     * 附加数据
     * @var mixed
     */
    protected $data;

    public function __construct($message = '', $code = 400, $data = null)
    {
        parent::__construct($message, $code);
        $this->data = $data;
    }

    /**
     * 获取附加数据
     * @return mixed
     */
    public function getData()
    {
        return $this->data;
    }
} 